// 配置
@titlebar-background-color: #3E464C;
@titlebar-height: 32px;
@titlebar-title-color: #FFF;
@titlebar-title-font-size: 16px;
@titlebar-title-max-width: 60%;
@titlebar-control-font-size: 24px;
@titlebar-control-background-color-hover: lighten(@titlebar-background-color, 12%);
@titlebar-control-close-background-color-hover: #FF5252;
@editor-background-color: #363F45;
@toolbar-horizontal-padding: 10px;
@toolbar-height: 48px;
@toolbar-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px 0;
@preview-background-color: #FCFCFC;
@preview-max-width: 960px;
@preview-padding-top: 0;
@preview-padding-bottom: 10px;
@preview-padding-left: 20px;
@preview-padding-right: 20px; // 初始化
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
button,
textarea,
p,
blockquote,
th,
td {
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  background: #FCFCFC;
  color: #404040;
  font-size: 16px;
  font-family: sans-serif;
  overflow: hidden;
}

h1 {
  font-size: 2em;
}

h2 {
  font-size: 1.5em;
}

h3 {
  font-size: 1.33em;
}

h4 {
  font-size: 1.17em;
}

h5 {
  font-size: 1.09em;
}

h6 {
  font-size: 1em;
}

small {
  font-size: 0.875rem;
  font-weight: normal;
}

hr {
  border-top: none;
  border-bottom: 1px solid #d9e1e8;
}

a {
  color: #03A9F4;
  text-decoration: none;
  outline: none;
}

a:hover {
  color: #FF4081;
}

a:visited {
  color: #9C27B0;
}

img {
  border: none;
}

button {
  background: none;
  border: none;
  outline: none;
  font-family: sans-serif;
  font-size: 15px;
  color: #333030;
  border-radius: 2px;
  padding: 8px 16px;
  cursor: pointer;
}

button:hover {
  background-color: rgba(153, 153, 153, 0.2);
}

ol,
ul,
li {
  list-style: none;
}

input {
  border-radius: 2px;
  font-size: 15px;
  font-family: sans-serif;
  border: 1px solid #CCC;
  padding: 8px;
  outline: none;
}

input:focus {
  border: 1px solid #47b8e0;
}

input[disabled] {
  background-color: #f4f4f4;
  cursor: not-allowed;
}

* {
  -webkit-transition-property: color, background-color;
  -webkit-transition-duration: 0.25s;
  -webkit-transition-timing-function: ease;
  -webkit-user-select: none;
}

@font-face {
  font-family: 'source-code';
  src: url('../font/sourceCodePro.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

// google-icon-font
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: local('Material Icons'), local('MaterialIcons-Regular'), url("../font/google-icon-font.woff2") format('woff2');
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  color: #FFF;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.color-cancel {
  color: #ADADAD;
}

.color-success {
  color: #03A9F4;
}

.color-warning {
  color: #FF5722;
}

.color-tip {
  opacity: .67;
}

.github {
  color: #999999;
}

.github:hover {
  color: #FF4081;
}

.horizontal-space-normal {
  margin-left: 10px;
}

.horizontal-space-large {
  margin-left: 20px;
}

.hidden {
  display: none;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.invisible {
  z-index: -10000;
  position: absolute;
  visibility: hidden;
  left: -10000px;
}

.float-left {
  float: left;
}

.float-right {
  float: right;
}

.inline-block {
  display: inline-block;
}

.radio-group .radio-group-item[selected] {
  background: #dce1e6;
}

.checkbox[checked] {
  background: #dce1e6;
}

.dialog-layout {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0;
  z-index: 9999;
  background-color: rgba(0, 0, 0, .6);
}

.dialog-layout input {
  width: 50%;
}

.dialog-container {
  background-color: #FFFFFF;
  width: 60%;
  border-radius: 2px;
  max-width: 600px;
  margin: 200px auto;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.25), 0 10px 18px rgba(0, 0, 0, 0.22);
  padding: 8px 24px;
}

.dialog-container h1,
.dialog-container h2,
.dialog-container h3,
.dialog-container h4,
.dialog-container h5,
.dialog-container h6 {
  padding: 0;
  margin: 16px 0 32px;
}

.dialog-container {
  border-left: 8px solid #03A9F4;
}

.dialog-container p {
  margin: 16px 0;
}

#toast-layout {
  position: fixed;
  top: 150px;
  width: 100%;
  text-align: center;
  display: none;
  z-index: 30;
}

#toast-container {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 2px;
  color: #FFFFFF;
  background: #03A9F4;
  max-width: 50%;
}

// cover
#cover {
  width: 100%;
  height: 100%;
  position: fixed;
  left: 0;
  top: 0;
  background-color: #000000;
  display: none;
  opacity: 0.5;
  z-index: 20;
}

//toolbar
.toolbar {
  width: calc(~"100% -"2 * @toolbar-horizontal-padding);
  height: @toolbar-height;
  box-shadow: @toolbar-shadow;
  text-align: center;
  padding: 0 @toolbar-horizontal-padding;
}

.toolbar-item {
  float: left;
  line-height: @toolbar-height - 12;
  padding: 0 6px;
  margin: 6px 0;
  cursor: pointer;
  border-radius: 2px;
}

// titlebar
#titlebar {
  width: 100%;
  height: @titlebar-height;
  background: @titlebar-background-color;
  text-align: center;
  -webkit-app-region: drag;
  cursor: default;
  position: relative;
}

#titlebar-logo {
  position: absolute;
  left: 0;
  top: 0;
  -webkit-app-region: no-drag;
}

#titlebar-logo:hover {
  background: @titlebar-control-background-color-hover;
}

#titlebar-title {
  font-size: @titlebar-title-font-size;
  color: @titlebar-title-color;
  display: inline-block;
  vertical-align: baseline;
  line-height: @titlebar-height;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: @titlebar-title-max-width;
}

#titlebar-control {
  height: 100%;
  float: right;
  position: absolute;
  right: 0;
  top: 0;
  -webkit-app-region: no-drag;
}

#titlebar-control li {
  float: left;
  width: @titlebar-height;
  height: 100%;
  font-size: @titlebar-control-font-size;
  line-height: @titlebar-height;
}

#titlebar-control li:hover {
  background: @titlebar-control-background-color-hover;
}

#titlebar-control li:last-child:hover {
  background: @titlebar-control-close-background-color-hover;
}

// main
#main {
  width: 100%;
  height: calc(~"100% - " @titlebar-height);
  position: relative;
  left: -25%;
}

#workspace-container {
  color: #D9D4CF;
  position: absolute;
  background: #3b4042;
  width: 25%;
  height: 100%;
  z-index: 30;
}

#workspace-search {
  position: relative;
  margin-top: 8px;
}

#workspace-search-input {
  width: calc(~"100%" - 40px);
  outline: none;
  border: none;
  font-size: 16px;
  font-family: sans-serif;
  padding: 7px 32px 7px 8px;
}

#workspace-search-btn {
  color: #757575;
  position: absolute;
  top: 4px;
  right: 8px;
  cursor: default;
}

#workspace-search-box {
  position: absolute;
  background: #42484a;
  width: 100%;
  box-shadow: 0 3px 6px rgba(33, 33, 33, 0.16), 0 3px 6px rgba(33, 33, 33, 0.23);
  height: 250px;
  overflow: auto;
  display: none;
}

#workspace-search-box::-webkit-scrollbar {
  width: 12px;
  height: 12px;
  background-color: #E0E3DA;
}

#workspace-search-box::-webkit-scrollbar-thumb {
  background-color: #BBC3BB;
}

#workspace-search-box::-webkit-scrollbar-thumb:hover {
  background-color: #6E7783;
}

#workspace-search-box li {
  padding: 3px 8px;
  cursor: default;
}

#workspace-search-box li[selected] {
  background: #5D6264;
}

#workspace-search-box li:hover {
  background: #5D6264;
}

.workspace-search-box-doc-name {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-search-box-doc-location {
  color: #acafb1;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#workspace-tree {
  padding-top: 8px;
  overflow: auto;
  width: 100%;
  height: calc(~"100% - " 48px);
}

#workspace-tree::-webkit-scrollbar {
  width: 12px;
  height: 12px;
  background-color: #363b3e;
}

#workspace-tree::-webkit-scrollbar-corner {
  background-color: #363b3e;
}

#workspace-tree::-webkit-scrollbar-thumb {
  background-color: #45494a;
}

#workspace-tree::-webkit-scrollbar-thumb:hover {
  background-color: #555555;
}

#main-container {
  width: 100%;
  height: 100%;
  position: relative;
  left: 25%;
}

// editor
#editor-container {
  width: 50%;
  height: 100%;
  background: @editor-background-color;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
}

#editor-container .toolbar-item {
  color: #B7B3B3;
}

#editor-container .toolbar-item:hover {
  color: #FEFEFE;
}

#editor-wrap {
  width: 100%;
  height: calc(~"100% - " @toolbar-height);
  max-width: 960px;
  margin: 0 auto;
}

#editor {
  width: 100%;
  height: 100%;
}

#editor * {
  -webkit-transition-property: none;
}

// preview
#preview-container {
  width: 50%;
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  background: @preview-background-color;
}

#preview-container .toolbar-item {
  color: #666;
}

#preview-container .toolbar-item:hover {
  color: #000000;
}

#preview-wrap {
  width: 100%;
  height: calc(~"100% - " @toolbar-height);
  overflow-x: hidden;
  overflow-y: scroll;
}

#preview-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
  background-color: #ECEDEA;
}

#preview-wrap::-webkit-scrollbar-thumb {
  background-color: #CFD4D6;
}

#preview-wrap::-webkit-scrollbar-thumb:hover {
  background-color: #B4BEC2;
}

#preview {
  padding: @preview-padding-top @preview-padding-right calc(@preview-padding-bottom) @preview-padding-left;
  max-width: @preview-max-width;
  margin: 0 auto;
  word-wrap: break-word;
  word-break: break-all;
}

#preview * {
  -webkit-user-select: all;
}

#content-container {
  padding: 16px;
  width: 400px;
  height: 600px;
  background: #FFFFFF;
  position: absolute;
  top: 54px;
  right: 8px;
  box-shadow: rgba(0, 0, 0, 0.3) 0 4px 8px 0;
  border-radius: 2px;
  overflow: auto;
  z-index: 5;
  display: none;
}

#content-title {
  margin: 0;
  vertical-align: bottom;
}

#content-words {
  margin-top: 16px;
  float: right;
}

#content-container ul {
  padding-left: 20px;
  list-style: none;
}

#content-container li {
  margin: 8px 0;
}
